package com.design.pattern.ChainResponsibility;

import java.util.Objects;

/**
 * @Projectname: Design-pattern
 * @Filename: HandleC
 * @Author: FANSEA
 * @Date:2024/11/7 22:45
 */
public class HandleC extends Handler<String>{
    @Override
    public void handle(String s){
        if (Objects.equals(s, "C")){
            System.out.println("HandleC");
        }else {
            if (next!= null){
                next.handle(s);
            }
        }
    }
}
